<div class="form bootform">    
    
    
<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableClientValidation'=>true,
    'clientOptions' => array('validateOnSubmit' => true ),
	'focus'=>array($model,'first_name'),
    'htmlOptions' => array('class' => 'wufoo' )
)); ?>

    <header class="info" id="header">
        <h2>Step 1: Fill the membership from</h2>

        <div class="alert-message block-message">
            Membership Form<br />
            Fields with <span class="required">*</span> are required.
        </div>
    </header>
    <?php echo $form->errorSummary($model); ?>
<ul>
    <li class="leftThird">
        <?php echo $form->labelEx($model,'code', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'code', array('class'=>'field text medium', 'readonly'=>'readonly')); ?></div>
        <label class="hint">Auto generate by system</label>
        <?php echo $form->error($model,'code'); ?>
    </li>
    <li class="middleThird">
        <?php echo $form->labelEx($model,'password', array('class'=>'desc')); ?>
        <div><?php echo $form->passwordField($model,'password',array('class'=>'field text medium', 'readonly'=>'readonly')); ?></div>
        <label class="hint">Auto generate by system and send to email</label>
        <?php echo $form->error($model,'password'); ?>
    </li>
    <li class="rightThird">
        <?php echo $form->labelEx($model,'email', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'email',array('class'=>'field text medium', 'readonly'=>'readonly')); ?></div>
        <label class="hint">Ex: example@domain.com</label>
        <?php echo $form->error($model,'email'); ?>
    </li>
    <li class="section">
        <section><h3>Applicants Information</h3></section>
    </li>
    <li class="leftThird">
        <?php echo $form->labelEx($model,'first_name', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'first_name',array('class'=>'field text medium')); ?></div>
        <label class="hint">First part of your full name</label>
        <?php echo $form->error($model,'first_name'); ?>
    </li>
    <li class="middleThird">
        <?php echo $form->labelEx($model,'last_name', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'last_name',array('class'=>'field text medium')); ?></div>
        <label class="hint">Rest parts of your full name</label>
        <?php echo $form->error($model,'last_name'); ?>
    </li>
    <li class="rightThird">
        <?php echo $form->labelEx($model,'photo', array('class'=>'desc')); ?>
        <div><?php echo $form->fileField($model,'photo',array('class'=>'field file medium')); ?></div>
        <label class="hint">Upload your own PP size photo</label>
        <?php echo $form->error($model,'photo'); ?>
    </li>
    <li class="date leftThird">
        <?php echo $form->labelEx($model,'dob', array('class'=>'desc')); ?>
<!--        <div><?php echo $form->textField($model,'dob', array('class'=>'field text medium')); ?></div>-->
        <div>
            <?php 
             $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                'model'=>$model,
                'attribute'=>'dob',
                'options'=>array(
                'dateFormat'=>'yy-mm-dd',
                'showAnim'=>'fold',
            ),
            'htmlOptions'=>array(
                'class'=>'field text medium picker'
                ),
            ));
            ?>
        </div>
        <label class="hint">YYYY-MM-DD (Click for Date Picker)</label>
        <?php echo $form->error($model,'dob'); ?>
    </li>
    <li class="middleThird">
        <?php echo $form->labelEx($model,'gender_id', array('class'=>'desc')); ?>
        <div><?php echo $form->radioButtonList($model,'gender_id',array('1'=>'Male', '2'=>'Female'),array('class'=>'field radio', 'separator'=>'', 'template' =>'<span style="width: 40px; ">{input}{label}</span>')); ?></div>
        <?php echo $form->error($model,'gender_id'); ?>
    </li>
    <li class="rightThird">
        <?php echo $form->labelEx($model,'religion_id', array('class'=>'desc')); ?>
        <div><?php echo $form->dropDownList($model,'religion_id', CHtml::listData(AppDefinedValues::model()->findAll("category = :RELIGION", array(':RELIGION' => 'RELIGION')), 'id', 'value'), array('empty'=>'Select Religion', 'class'=>'field select medium')); ?><div>
        <label class="hint">Religion is optional</label>
        <?php echo $form->error($model,'religion_id'); ?>
    </li>
    <li class="leftThird">
        <?php echo $form->labelEx($model,'nationality', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'nationality',array('class'=>'field text medium')); ?></div>
        <label class="hint">According to national ID card</label>
        <?php echo $form->error($model,'nationality'); ?>
    </li>
    <li class="middleThird">
        <?php echo $form->labelEx($model,'national_id', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'national_id',array('class'=>'field text medium')); ?></div>
        <label class="hint">Your national card ID</label>
        <?php echo $form->error($model,'national_id'); ?>
    </li>
    <li class="rightThird">
        <?php echo $form->labelEx($model,'passport_no', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'passport_no',array('class'=>'field text medium')); ?></div>
        <label class="hint">Required only if you don't have national ID</label>
        <?php echo $form->error($model,'passport_no'); ?>
    </li>

    <li class="section">
        <section><h3>Applicants Contact Information</h3></section>
    </li>

    <li class="leftHalf">
        <?php echo $form->labelEx($model->address,'address_line1', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'address_line1',array('class'=>'field text medium')); ?></div>
        <label class="hint">House Address</label>
        <?php echo $form->error($model->address,'address_line1'); ?>
    </li>
    <li class="rightHalf">
        <?php echo $form->labelEx($model->address,'address_line2', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'address_line2',array('class'=>'field text medium')); ?></div>
        <label class="hint">Street Address</label>
        <?php echo $form->error($model->address,'address_line1'); ?>
    </li>
    <li class="leftFifth">
        <?php echo $form->labelEx($model->address,'zip_code', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'zip_code',array('class'=>'field text medium')); ?></div>
        <label class="hint">Street Address</label>
        <?php echo $form->error($model->address,'zip_code'); ?>
    </li>
    <li class="middleFifth">
        <?php echo $form->labelEx($model->address,'city', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'city',array('class'=>'field text medium')); ?></div>
        <?php echo $form->error($model->address,'city'); ?>
    </li>
    <li class="middleFifth">
        <?php echo $form->labelEx($model->address,'country', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'country',array('class'=>'field text medium', 'readonly'=>'readonly')); ?></div>
        <?php echo $form->error($model->address,'country'); ?>
    </li>
    <li class="middleFifth">
        <?php echo $form->labelEx($model->address,'home_phone', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'home_phone',array('class'=>'field text medium')); ?></div>
        <label class="hint">Land line number</label>
        <?php echo $form->error($model->address,'home_phone'); ?>
    </li>
    <li class="rightFifth">
        <?php echo $form->labelEx($model->address,'mobile', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->address,'mobile',array('class'=>'field text medium')); ?></div>
        <label class="hint">Mobile phone number</label>
        <?php echo $form->error($model->address,'mobile'); ?>
    </li>

    <li class="section">
        <section><h3>Applicants Bank Information</h3></section>
    </li>

    <li class="leftFourth">
        <?php echo $form->labelEx($model->bank_account,'bank_id', array('class'=>'desc')); ?>
        <div><?php echo $form->dropDownList($model->bank_account,'bank_id', CHtml::listData(Bank::model()->findAll(), 'id', 'name'), array('empty'=>'Select Bank', 'class'=>'field select medium')); ?><div>
        <?php echo $form->error($model->bank_account,'bank_id'); ?>
    </li>
    <li class="middleFourth">
        <?php echo $form->labelEx($model->bank_account,'bank_branch_id', array('class'=>'desc')); ?>
        <div><?php echo $form->dropDownList($model->bank_account,'bank_branch_id', CHtml::listData(BankBranch::model()->findAll(), 'id', 'name'), array('empty'=>'Select Bank', 'class'=>'field select medium')); ?><div>
        <?php echo $form->error($model->bank_account,'bank_branch_id'); ?>
    </li>

    <li class="middleFourth">
        <?php echo $form->labelEx($model->bank_account,'acc_no', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->bank_account,'acc_no',array('class'=>'field text medium')); ?></div>
        <?php echo $form->error($model->bank_account,'acc_no'); ?>
    </li>
    <li class="rightFourth">
        <?php echo $form->labelEx($model->bank_account,'acc_name', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->bank_account,'acc_name',array('class'=>'field text medium')); ?></div>
        <?php echo $form->error($model->bank_account,'acc_name'); ?>
    </li>

    <li class="section">
        <section><h3>Beneficiary Information</h3></section>
    </li>

    <li class="leftHalf">
        <?php echo $form->labelEx($model->beneficiary,'name', array('class'=>'desc')); ?>
        <?php echo $form->textField($model->beneficiary, 'name', array('class'=>'field text full')); ?>
        <label class="hint">Beneficiary full name</label>
        <?php echo $form->error($model->beneficiary, 'name'); ?>
    </li>
    <li class="rightHalf">
        <label class="desc" for="">Photo</label>
        <div><input type="file" id="" class=""></div>
        <label class="hint">Upload Beneficiary's PP size photo</label>
    </li>
    <li class="leftThird">
        <?php echo $form->labelEx($model->beneficiary,'nationality', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->beneficiary,'nationality',array('class'=>'field text medium')); ?></div>
        <?php echo $form->error($model->beneficiary,'nationality'); ?>
    </li>
    <li class="middleThird">
        <?php echo $form->labelEx($model->beneficiary,'national_id', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->beneficiary,'national_id',array('class'=>'field text medium')); ?></div>
        <?php echo $form->error($model->beneficiary,'national_id'); ?>
    </li>
    <li class="rightThird">
        <?php echo $form->labelEx($model->beneficiary,'passport_no', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model->beneficiary,'passport_no',array('class'=>'field text medium')); ?></div>
        <?php echo $form->error($model->beneficiary,'passport_no'); ?>
    </li>

    <li class="section">
        <section><h3>Sponsor/ Introduces Information</h3></section>
    </li>
    <li>
        <?php echo $form->labelEx($model,'introducer_id', array('class'=>'desc')); ?>
        <div><?php echo $form->textField($model,'introducer_id',array('class'=>'field text medium')); ?></div>
        <label class="hint">Introducer/Sponsor Code</label>
        <?php echo $form->error($model,'introducer_id'); ?>
    </li>

    <li class="section">
        <section><h3>Acknowledgement</h3></section>
    </li>

    <li class="full">
        <?php echo $form->labelEx($model,'acknowledge', array('class'=>'desc')); ?>
        <div><?php echo $form->checkBox($model,'acknowledge',array('class'=>'field checkbox')); ?></div>
        <label class="hint">I herby agree to participate in the Ta'awun program on my own will. I clearly understand the process and all associate terms and conditions of the program and willingly follow and contribute to this program.</label>
        <?php echo $form->error($model,'acknowledge'); ?>
    </li>

    <li class="buttons action ">
        <div>
            <?php echo CHtml::submitButton($model->isNewRecord ? 'Submit' : 'Save', array('class'=>'btn primary')); ?>
        </div>
    </li>
</ul>

<?php $this->endWidget(); ?>

</div><!-- form -->